import myRequest from './index';

export const getAllCategoryListApi = () => {
  return myRequest<any>('/admin_api/category/category_tree');
};

export const getCategoryListApi = (data: any) => {
  return myRequest<any>('/admin_api/category/list', {
    method: 'POST',
    data,
  });
};

export const editCategoryApi = (data: any) => {
  return myRequest<any>('/admin_api/category/edit', {
    method: 'POST',
    data,
  });
};

export const addCategoryApi = (data: any) => {
  return myRequest<any>('/admin_api/category/add', {
    method: 'POST',
    data,
  });
};
